import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/product-info/getAllPage',
    method: 'get',
    params
  })
}

export function saveProduct(data) {
  return request({
    url: '/product-info/',
    method: 'post',
    data
  })
}

// 回写

export function queryProductInfo(id) {
  return request({
    url: `/product-info/info/${id}`,
    method: 'post'
  })
}

// 查询类别
export function queryCategory() {
  return request({
    url: 'product-category/getAll',
    method: 'get'
  })
}
